<jtmpl:comment>
@version	$Id: ftpconfig.html 10871 2008-08-30 07:30:33Z willebil $
@package	Joomla
@subpackage	Installation
@copyright	Copyright (C) 2005 - 2008 Open Source Matters. All rights reserved.
@license	GNU/GPL
</jtmpl:comment>
<script language="JavaScript" type="text/javascript">
<!--

	Window.onDomReady(function(){
	document.formvalidator.handlers['isftp'] = { enabled : true,
									exec : function (value) {
										if (document.getElementById('ftpenable').checked == true) {
											if (value == '') {
												return false;
											} else {
												return true;
											}
										} else {
											return true;
										}
									}
									}
	});

	function validateForm( frm, task ) {
		var valid = document.formvalidator.isValid(frm);
		if (valid == false) {
			return false;
		}

		var ftpEnable = document.getElementById("ftpenable");
		var ftpRoot = document.getElementById("ftproot");

		if (ftpEnable.checked == false) {
			submitForm( frm, task );
		} else if (ftpRoot.value == '') {
			alert( '<jtmpl:translate key="warnFtpRoot" escape="yes">Please enter an FTP Root or use\nthe autofind root button.</jtmpl:translate>' );
			return;
		} else {
			submitForm( frm, task );
		}
	}

	function doFTPVerify() {
		xajax_FTPVerify(xajax.getFormValues('adminForm'));
	}

	function JProcess() {

		if ( document.getElementById("ftphost").value == '' ) {
			alert( '<jtmpl:translate key="validFtpHost" escape="yes">Please enter a correct FTP host</jtmpl:translate>' );
			return;
		} else if (document.getElementById("ftpuser").value == '') {
			alert( '<jtmpl:translate key="validFtpUser" escape="yes">Please enter a username</jtmpl:translate>' );
			return;
		} else if (document.getElementById("ftppass").value == '') {
			alert( '<jtmpl:translate key="validFtpPass" escape="yes">Please enter a FTP password</jtmpl:translate>' );
			return;
		} else {
			xajax_getFtpRoot(xajax.getFormValues('adminForm'));
		}
	}
//-->
</script>
<form action="index.php" method="post" name="adminForm" id="adminForm" class="form-validate" autocomplete="off">

<div id="right">
	<div id="rightpad">
		<div id="step">
			<div class="t">
				<div class="t">
					<div class="t"></div>
				</div>
			</div>
			<div class="m">
				<div class="far-right">
					<jtmpl:tmpl name="buttons" type="condition" conditionvar="direction">
						<jtmpl:sub condition="ltr">
							<div class="button1-right"><div class="prev"><a onclick="submitForm( adminForm, 'dbconfig' );" alt="<jtmpl:translate escape="yes">Previous</jtmpl:translate>"><jtmpl:translate escape="yes">Previous</jtmpl:translate></a></div></div>
							<div class="button1-left"><div class="next"><a onclick="validateForm( adminForm, 'mainconfig' );" alt="<jtmpl:translate escape="yes">Next</jtmpl:translate>"><jtmpl:translate escape="yes">Next</jtmpl:translate></a></div></div>
						</jtmpl:sub>
						<jtmpl:sub condition="rtl">
							<div class="button1-right"><div class="prev"><a onclick="validateForm( adminForm, 'mainconfig' );" alt="<jtmpl:translate escape="yes">Next</jtmpl:translate>"><jtmpl:translate escape="yes">Next</jtmpl:translate></a></div></div>
							<div class="button1-left"><div class="next"><a onclick="submitForm( adminForm, 'dbconfig' );" alt="<jtmpl:translate escape="yes">Previous</jtmpl:translate>"><jtmpl:translate escape="yes">Previous</jtmpl:translate></a></div></div>
						</jtmpl:sub>
					</jtmpl:tmpl>
				</div>
				<span class="step"><jtmpl:translate>FTP Configuration</jtmpl:translate></span>
			</div>
			<div class="b">
				<div class="b">
					<div class="b"></div>
				</div>
			</div>
		</div>

		<div id="installer">
			<div class="t">
				<div class="t">
					<div class="t"></div>
				</div>
			</div>
			<div class="m">

				<h2><jtmpl:translate>FTP Configuration</jtmpl:translate>:</h2>
				<div class="install-text">
					<jtmpl:translate key="tipFtpConfSteps">
					<p>Due to filesystem permission restrictions and PHP Safe Mode restrictions.
					For all users to utilize the Joomla! installers an FTP layer exists to handle
					filesystem manipulation.
					<br />
					<br />
					Enter an FTP username and password with access to the Joomla! root directory,
					this will be the FTP account that handles all filesystem operations when Joomla!
					requires FTP access to complete a task.
					<br />
					<br />
					For security reasons, it is best if a separate FTP user account is created with
					access only to the Joomla! installation.</p>
					</jtmpl:translate>
				</div>
				<div class="install-body">
					<div class="t">
						<div class="t">
							<div class="t"></div>
						</div>
					</div>
					<div class="m">

						<h3 class="title-smenu" title="<jtmpl:translate>Basic</jtmpl:translate>"><jtmpl:translate>Basic Settings</jtmpl:translate></h3>
						<div class="section-smenu">
							<table class="content2">
								<tr>
									<td width="100">
										<input id="ftpenable" type="radio" name="vars[ftpEnable]" value="1" />
										<label for="vars_ftpenable">
											<jtmpl:translate key="YES">Yes</jtmpl:translate>
										</label>
										<br />
										<input id="ftpdisable" type="radio" name="vars[ftpEnable]" value="0" checked="checked" />
										<label for="vars_ftpdisable">
											<jtmpl:translate key="NO">No</jtmpl:translate>
										</label>
									</td>
									<td align="justify">
										<jtmpl:translate key="ENABLEFTPDESC">Enable FTP filesystem layer</jtmpl:translate>
									</td>
								</tr>
								<tr>
									<td width="100">
										<label for="ftpuser">
											<span id="ftpusermsg"><jtmpl:translate>FTP user</jtmpl:translate></span>
										</label>
									</td>
									<td align="center">
										<input class="inputbox validate notrequired isftp ftpusermsg" type="text" id="ftpuser" name="vars[ftpUser]" value="{VAR_FTPUSER}" size="30"/>
									</td>
								</tr>
								<tr>
									<td>
										<label for="ftppass">
											<span id="ftppassmsg"><jtmpl:translate>FTP password</jtmpl:translate></span>
										</label>
									</td>
									<td align="center">
										<input class="inputbox validate notrequired isftp ftppassmsg" type="password" id="ftppass" name="vars[ftpPassword]" value="{VAR_FTPPASSWORD}" size="30"/>
									</td>
								</tr>
								<tr id="rootPath">
									<td>
										<label for="ftproot">
											<span id="ftprootmsg"><jtmpl:translate>FTP Root Path</jtmpl:translate></span>
										</label>
									</td>
									<td align="center">
										<input class="inputbox validate notrequired isftp ftprootmsg" id="ftproot" type="text" name="vars[ftpRoot]" value="{VAR_FTPROOT}" size="30"/>
									</td>
								</tr>
							</table>
							<input type="button" id="findbutton" class="button" value="<jtmpl:translate>Autofind FTP Path</jtmpl:translate>" onclick="JProcess();" />
							<input type="button" id="verifybutton" class="button" value="<jtmpl:translate>Verify FTP Settings</jtmpl:translate>" onclick="doFTPVerify();" />
							<br /><br />
						</div>

						<h3 class="title-smenu moofx-toggler" title="<jtmpl:translate>Advanced</jtmpl:translate>"><jtmpl:translate>Advanced settings</jtmpl:translate></h3>
						<div class="section-smenu moofx-slider">
							<table class="content2">
								<tr id="host">
									<td width="100">
										<label for="ftphost">
											<jtmpl:translate>FTP host</jtmpl:translate>
										</label>
									</td>
									<td align="center">
										<input class="inputbox" type="text" id="ftphost" name="vars[ftpHost]" value="{VAR_FTPHOST}" size="30"/>
									</td>
								</tr>
								<tr id="port">
									<td width="100">
										<label for="ftpport">
											<jtmpl:translate>FTP port</jtmpl:translate>
										</label>
									</td>
									<td align="center">
										<input class="inputbox" type="text" id="ftpport" name="vars[ftpPort]" value="{VAR_FTPPORT}" size="30"/>
									</td>
								</tr>
								<tr>
									<td width="100">
										<label for="ftpsavepass">
											<jtmpl:translate>Save FTP Password</jtmpl:translate>
										</label>
									</td>
									<td align="justify">
										<input id="ftpsavepass" type="radio" name="vars[ftpSavePass]" value="1" />
										<label for="ftpsavepass">
											<jtmpl:translate key="YES">Yes</jtmpl:translate>
										</label>
										<br />
										<input id="ftpnosavepass" type="radio" name="vars[ftpSavePass]" value="0" checked="checked" />
										<label for="ftpnosavepass">
											<jtmpl:translate key="NO">No</jtmpl:translate>
										</label>
									</td>
								</tr>
							</table>
						</div>
						<div class="clr"></div>
					</div>
					<div class="b">
						<div class="b">
							<div class="b"></div>
						</div>
					</div>
					<div class="clr"></div>
				</div>
				<div class="clr"></div>
			</div>
			<div class="b">
				<div class="b">
					<div class="b"></div>
				</div>
			</div>
		</div>
	</div>
</div>
<div class="clr"></div>

<input type="hidden" name="task" value="" />
<input type="hidden" name="lang" value="{LANG}" />
</form>

<script type="text/javascript">
	//Element.cleanWhitespace('content');
	//init();
</script>
